package com.yeswater.multithread.chapter1.test1_11.test5;

import java.util.concurrent.TimeUnit;

/**
 * author : yeswater
 * date : 2023/10/19
 */

public class MyThread extends Thread{
    @Override
    public void run() {
        super.run();
        try {
            System.out.println("run begin");
            TimeUnit.SECONDS.sleep(200);
            System.out.println("run end");
        } catch (InterruptedException e) {
            System.out.println(" 在沉睡中被停止! 进入 catch!" + this.isInterrupted());
            e.printStackTrace();
        }
    }
}
